const user = {
  namespaced: true,
  state: {
    name: 'test',
    avatar: 'test-avatar',
    roles: ['testroles'],
    permissions: ['testper']
  },
  mutations: {
    getUsers(state, val) {
      state.name = val
    },
    setUserInfo(state, val) {
      console.log('保存用户信息')
    }
  },
  actions: {
    getUser({
      commit
    }) {
      commit('getUsers', "getUsers")
    },
    Login({
      commit
    }, obj) {
      console.log('登录')
      commit('setUserInfo', obj)
    }
  }
}

export default user
